package com.lry.basic.algorithm.niuke;

import java.util.Scanner;

public class UnInt {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int num = scanner.nextInt();
        String str = ""+num;
        while(str.endsWith("0")){
            str = str.substring(0,str.length()-1);
        }
        if("".endsWith(str))
            System.out.println(0);

        boolean[] visited = new boolean[10];
        char[]cs = str.toCharArray();
        String res = "";
        for(int i=cs.length-1;i>=0;i--){
            if(!visited[cs[i]-48]){
                res+=(cs[i]-48);
                visited[cs[i]-48]=true;
            }
        }
        System.out.println(Integer.valueOf(res));
    }
}
